##FIGURE 1
#Mean Squared Errors
meff <- c(.45,
          .33,
          .22,
          .18)
se <- c(.54/sqrt(88),.43/sqrt(396),.35/sqrt(758),.31/sqrt(206))
barCenters <- barplot(height = meff,
                      names.arg = c("Not at All", "Not Very Well", "Fairly Well", "Extremely Well"),
                      beside = true, main="Mean Squared Error by Reported Self Validation",
                      ylim = c(0, .6),
                      cex.names = 1.2, 
                      cex.axis=1.2,
                      cex.lab=1.2,
                      cex.main=1.3,
                      ylab = "Mean Squared Error", xlab="Represents My Views",
                      border = "black", axes = TRUE)
segments(barCenters, meff - se * 1.96, barCenters,
         meff + se * 1.96, lwd = 1.5)

arrows(barCenters, meff - se * 1.96, barCenters,
       meff + se * 1.96, lwd = 1.5, angle = 90,
       code = 3, length = 0.05)


##DIFFERENCE
meff <- c(-0.0316016,
          -0.1000244,
          -0.1684472,
          -0.2368699)
se <- c(0.0421958,
        0.0248743,
        0.0220538,
        0.0371941)
barCenters <- barplot(height = meff,
                      names.arg = c("Not at All", "Not Very Well", "Fairly Well", "Extremely Well"),
                      beside = true, 
                      #main="Difference Score",
                      ylim = c(-.35, .1),
                      cex.names = 1.2, 
                      cex.axis=1.2,
                      cex.lab=1.2,
                      cex.main=1.3,
                      ylab = "Effect of Ideological Disagreement", xlab="Represents My Views",
                      border = "black", axes = TRUE)

segments(barCenters, meff - se * 1.96, barCenters,
         meff + se * 1.96, lwd = 1.5)

arrows(barCenters, meff - se * 1.96, barCenters,
       meff + se * 1.96, lwd = 1.5, angle = 90,
       code = 3, length = 0.05)


##FIGURE 3
par(mfrow=c(2,3),cex=1)
###BJ ORIGINAL
meff <- c(0.1270821,
          0.0354419,
          -0.0561983,
          -0.1478384)
se <- c(0.0418212,
        0.0254185,
        0.0226947,
        0.0368219)
barCenters <- barplot(height = meff,
                      names.arg = c("Not at All", "Not Very Well", "Fairly Well", "Extremely Well"),
                      beside = true, main="Bartels and Johnston Original",
                      ylim = c(-.75, .75),
                      cex.names = 0.75, 
                      ylab = "Effect of Ideological Disagreement", xlab="Represents My Views",
                      border = "black", axes = TRUE)

segments(barCenters, meff - se * 1.96, barCenters,
         meff + se * 1.96, lwd = 1.5)

arrows(barCenters, meff - se * 1.96, barCenters,
       meff + se * 1.96, lwd = 1.5, angle = 90,
       code = 3, length = 0.05)

##BJ VARIANT
meff <- c(0.1268114,
          -0.0084834,
          -0.1437782,
          -0.279073)
se <- c(0.0630707,
        0.0395176,
        0.0324047,
        0.0494285)
barCenters <- barplot(height = meff,
                      names.arg = c("Not at All", "Not Very Well", "Fairly Well", "Extremely Well"),
                      beside = true, main="Bartels and Johnston Variant",
                      ylim = c(-.75, .75),
                      cex.names = 0.75, 
                      ylab = "Effect of Ideological Disagreement", xlab="Represents My Views",
                      border = "black", axes = TRUE)

segments(barCenters, meff - se * 1.96, barCenters,
         meff + se * 1.96, lwd = 1.5)

arrows(barCenters, meff - se * 1.96, barCenters,
       meff + se * 1.96, lwd = 1.5, angle = 90,
       code = 3, length = 0.05)

##CG
meff <- c(.12085,
          .0008315,
          -.1191869,
          -.2392054)
se <- c(.0516585,
        .0320216,
        .0293874,
        .0467259)
barCenters <- barplot(height = meff,
                      names.arg = c("Not at All", "Not Very Well", "Fairly Well", "Extremely Well"),
                      beside = true, main="Christenson and Glick Original",
                      ylim = c(-.75, .75),
                      cex.names = 0.75, 
                      ylab = "Effect of Ideological Disagreement", xlab="Represents My Views",
                      border = "black", axes = TRUE)

segments(barCenters, meff - se * 1.96, barCenters,
         meff + se * 1.96, lwd = 1.5)

arrows(barCenters, meff - se * 1.96, barCenters,
       meff + se * 1.96, lwd = 1.5, angle = 90,
       code = 3, length = 0.05)

##GN ORIGINAL
meff <- c( .1886681,
           .0663589,
           -.0559503,
           -.1782596)
se <- c(.153852,
        .0809514,
        .0598782,
        .1215204)
barCenters <- barplot(height = meff,
                      names.arg = c("Not at All", "Not Very Well", "Fairly Well", "Extremely Well"),
                      beside = true, main="Gibson and Nelson Original",
                      ylim = c(-.75, .75),
                      cex.names = 0.75, 
                      ylab = "Effect of Ideological Disagreement", xlab="Represents My Views",
                      border = "black", axes = TRUE)

segments(barCenters, meff - se * 1.96, barCenters,
         meff + se * 1.96, lwd = 1.5)

arrows(barCenters, meff - se * 1.96, barCenters,
       meff + se * 1.96, lwd = 1.5, angle = 90,
       code = 3, length = 0.05)

##GN VARIANT
meff <- c(.2340678,
          .0464627,
          -.1411424,
          -.3287475)
se <- c(.1326873,
        .0710816,
        .0563691,
        .1094558)
barCenters <- barplot(height = meff,
                      names.arg = c("Not at All", "Not Very Well", "Fairly Well", "Extremely Well"),
                      beside = true, main="Gibson and Nelson Variant",
                      ylim = c(-.75, .75),
                      cex.names = 0.75, 
                      ylab = "Effect of Ideological Disagreement", xlab="Represents My Views",
                      border = "black", axes = TRUE)

segments(barCenters, meff - se * 1.96, barCenters,
         meff + se * 1.96, lwd = 1.5)

arrows(barCenters, meff - se * 1.96, barCenters,
       meff + se * 1.96, lwd = 1.5, angle = 90,
       code = 3, length = 0.05)

